package svc

import (
	"github.com/zeromicro/go-zero/zrpc"
	"jd-mall/api/internal/config"
	"jd-mall/jd_srv/jdsrvclient"
)

type ServiceContext struct {
	Config config.Config
	JdSrv  jdsrvclient.JdSrv
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config: c,
		JdSrv:  jdsrvclient.NewJdSrv(zrpc.MustNewClient(c.JdSrv)),
	}
}
